package org.xtremeobjects.domain.model.ddd;

import org.xtremeobjects.domain.model.ddd.config.IAgregateInfo;

import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;

public class Agregate implements IAgregate {

	private IAgregateInfo agregateInfo;

	@Inject
	public Agregate(@Assisted IAgregateInfo agregateInfo) {
		this.agregateInfo = agregateInfo;
	}

	/* (non-Javadoc)
	 * @see org.xtremeobjects.domain.model.ddd.IAgregate#getFactory()
	 */
	public Factory getFactory() {
		return this.agregateInfo.getFactory();
	}

	/* (non-Javadoc)
	 * @see org.xtremeobjects.domain.model.ddd.IAgregate#getRepository()
	 */
	public Repository getRepository() {
		return this.agregateInfo.getRepository();
	}

}
